<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="/templates/mainTemplate.xhtml">
	<ui:define name="windowTitle">
            #{msgs.loginTitle}
         </ui:define>
	<ui:define id="note" name="content">
		<h:form>
			<rich:panel>
				<rich:dataTable
					onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
					onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
					cellpadding="0" cellspacing="0" width="700" border="0"
					id="noteList" style="width : 100%" styleClass="tableStyle"
					rowClasses="oddRow,evenRow" headerClass="tableHeader"
					value="#{noteListBean.noteList}" var="noteItem">
					<f:facet name="header">
						<rich:column>
							<h:outputText styleClass="textStyle" value="Lista notatek" />
						</rich:column>
						<rich:columnGroup>
							<rich:column>
								<h:outputText styleClass="headerText" value="Nazwa" />
							</rich:column>
							<rich:column>
								<h:outputText styleClass="headerText" value="Opis" />
							</rich:column>
							<rich:column>
								<h:outputText styleClass="headerText" value="Stwórz" />
							</rich:column>
							<rich:column>
								<h:outputText styleClass="headerText" value="Usuń" />
							</rich:column>
						</rich:columnGroup>
					</f:facet>

					<rich:column>
						<h:commandLink
							action="#{noteListBean.showNoteDetails(noteItem.id)}"
							value="#{noteItem.name}" />
					</rich:column>
					<rich:column>
						<h:outputText value="#{noteItem.description}" />
					</rich:column>
					<rich:column>
						<h:commandLink value="Zadanie"
							action="#{noteListBean.goToCreateTask(noteItem.id)}">
						</h:commandLink>
						/
						<h:commandLink value="Projekt"
							action="#{noteListBean.goToCreateProject(noteItem.id)}">
						</h:commandLink>
					</rich:column>
					<rich:column>
						<h:commandLink value="Usuń"
							action="#{noteListBean.deleteNote(noteItem)}">
						</h:commandLink>
					</rich:column>

				</rich:dataTable>


				<h:panelGroup style="display:block; text-align:center; margin: 10px">
					<h:commandButton action="#{noteListBean.goToCreateNoteSite}"
						value="#{msg.addNewNote}" />
				</h:panelGroup>
			</rich:panel>
		</h:form>
	</ui:define>

</ui:composition>